Complexity of Disjunctive Sequences
نویسندگان
چکیده
A sequence over an alphabet Σ is called disjunctive [13] if it contains all possible finite strings over Σ as its substrings. Disjunctive sequences have been recently studied in various contexts, e.g. [12, 9]. They abound in both category and measure senses [5]. In this paper we measure the complexity of a sequence x by the complexity of the language P (x) consisting of all prefixes of x. The languages P (x) associated to disjunctive sequences can be arbitrarily complex. We show that for some disjunctive numbers x the language P (x) is contextsensitive, but no language P (x) associate to a disjunctive number can be context-free. We also show that computing a disjunctive number x by rationals corresponding to an infinite subset of P (x) does not decrease the complexity of the procedure, i.e. if x is disjunctive, then P (x) contains no infinite context-free language. This result reinforces, in a way, Chaitin’s thesis [6] according to which perfect sets, i.e. sets for which there is no way to compute infinitely many of its members essentially better (simpler/quicker) than computing the whole set, do exist. Finally we prove the existence of the following language-theoretic complexity gap: There is no x ∈ Σ such that P (x) is context-free but not regular. If the set of all finite substrings of a sequence x ∈ Σ is slender, then the set of all prefixes of x is regular, that is P (x) is regular if and only if S(x) is slender. The proofs essentially use some recent results concerning the complexity of languages containing a bounded number of strings of each length [15, 14, 11, 16]. 1 Preliminaries Let Σ be a finite set and denote by Σ∗ and Σ, respectively, the sets of all (finite) strings and (one-way infinite) sequences over Σ. For x in Σ we define the following two sets: S(x) = {u ∈ Σ∗ | x = vuy, v ∈ Σ∗, y ∈ Σ}, and P (x) = {u ∈ Σ∗ | x = uy, y ∈ Σ}, that is, S(x) is the set of all finite substrings of x, and P (x) is the set of all finite prefixes of x. For a language L ⊆ Σ∗ define Sf (L) = {v ∈ Σ∗ | uvw ∈ L, u,w ∈ Σ∗}. Note that Sf is similar to S, but for languages of finite strings rather than for infinite sequences. Similarly, we define Pf (L) = {u ∈ Σ∗ | uw ∈ L, w ∈ Σ∗}. ∗This paper has been completed during the second author’s visit at the University of Auckland in 1995. The first author has been supported by AURC A18/XXXXX/62090/F3414030, 1994. †Computer Science Department, The University of Auckland, Private Bag 92109, Auckland, New Zealand, e-mail: [email protected]. ‡Department of Computer Science, The University of Western Ontario, London, Ontario, Canada N6A 5B7, e-mail: [email protected]. For a finite string u ∈ Σ∗, |u| denotes the length of u. For a language L ⊆ Σ∗, card(L) denotes the cardinality of L. Lemma 1.1. For each x ∈ Σ, S(x) = Sf (P (x)). Proof. If u belongs to S(x), then x = vuy, for some v ∈ Σ∗ and y ∈ Σ. So, vu is in P (x) and, therefore, u ∈ Sf (P (x)). Conversely, let w ∈ Sf (P (x)), i.e. uwv = z, for some u, v ∈ Σ∗ and z ∈ P (x). Since z ∈ P (x), it follows that x = zx′, for some x′ ∈ Σ, that is x = uwvx′ = uwx′′, where x′′ = vx′. Consequently, w ∈ S(x). 2 For every language L ⊆ Σ∗ define the density function DL by DL(n) = card(L ∩ Σ), where Σ denotes the set of all strings of length n over Σ. If a language L has a constant density, i.e., DL = O(1), then it is called a slender language, which was termed in [1]. The following results have been proven in [15]. Lemma 1.2. A regular language R over Σ has a density O(n), k ≥ 0 if and only if R can be represented as a finite union of regular expressions of the following form: xy∗ 1z1 · · · y∗ t zt, where x, y1, z1, . . . , yt, zt ∈ Σ∗ and 0 ≤ t ≤ k + 1. Lemma 1.3. Let R be a regular language, R′ = Sf (R) and let k be a non-negative integer. Then DR(n) = O(n) if and only if DR′(n) = O(n). Several of the subsequent proofs depend on the following result, which has been proved in [11] (see also [16]). Lemma 1.4. Let L ⊆ Σ∗ be a context-free language. Then L is slender, i.e., DL(n) = O(1), if and only if L is a finite union of languages of the form: {u1u2u3u4u5 | i ≥ 0}, where u1, u2, u3, u4, u5 ∈ Σ∗. 2 How Complex Are Disjunctive Sequences? A sequence x ∈ Σ is disjunctive [13] provided it contains all possible finite strings over Σ as its substrings, i.e. S(x) = Σ∗. At the top, disjunctive sequences x can be random, non-random but non-recursive, recursive, but arbitrarily complex. At the bottom, the complexity of a sequence x will be measured by the complexity of the language P (x) consisting of all prefixes of x; these languages can be context-sensitive, but not context-free. Chaitin’s Omega Number [7] is Borel normal in any base and, therefore, disjunctive in any base. More generally, by Theorem 3.6 in [3], every random sequence is Borel normal and, hence, disjunctive. All these sequences are non-recursive; they form a class of measure one [4]. Non-random and non-recursive disjunctive sequences have been constructed in [13]. Having disposed of the non-recursive case we turn our attention to recursive disjunctive sequences. First we rely on Rabin’s Theorem (see, for instance, Theorem 3.5 in [2]) to construct arbitrarily complex recursive disjunctive sequences:
منابع مشابه
How Large is the Set of Disjunctive Sequences?
We consider disjunctive sequences, that is, infinite sequences (ω-words) having all finite words as infixes. It is shown that the set of all disjunctive sequences can be described in an easy way using recursive languages and, besides being a set of measure one, is a residual set in Cantor space. Moreover, we consider the subword complexity of sequences: here disjunctive sequences are shown to b...
متن کاملLanguage-theoretic Complexity of Disjunctive Sequences
A sequence over an alphabet Σ is called disjunctive [13] if it contains all possible finite strings over Σ as its substrings. Disjunctive sequences have been recently studied in various contexts, e.g. [12, 9]. They abound in both category and measure senses [5]. In this paper we measure the complexity of a sequence x by the complexity of the language P (x) consisting of all prefixes of x. The l...
متن کاملDisjunctive Interpolants for Horn-Clause Verification (Extended Technical Report)
One of the main challenges in software verification is efficient and precise compositional analysis of programs with procedures and loops. Interpolation methods remains one of the most promising techniques for such verification, and are closely related to solving Horn clause constraints. We introduce a new notion of interpolation, disjunctive interpolation, which solve a more general class of p...
متن کاملParallel Generation of t-ary Trees
A parallel algorithm for generating t-ary tree sequences in reverse B-order is presented. The algorithm generates t-ary trees by 0-1 sequences, and each 0-1 sequences is generated in constant average time O(1). The algorithm is executed on a CREW SM SIMD model, and is adaptive and cost-optimal. Prior to the discussion of the parallel algorithm a new sequential generation with O(1) average time ...
متن کاملDisjunctive Interpolants for Horn-Clause Verification
One of the main challenges in software verification is efficient and precise compositional analysis of programs with procedures and loops. Interpolation methods remains one of the most promising techniques for such verification, and are closely related to solving Horn clause constraints. We introduce a new notion of interpolation, disjunctive interpolation, which solves a more general class of ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1995